<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<head th:replace="common/header::common_head"></head>
<title>角色管理</title>
<style type="text/css">
    .shadow {
        width: 100%;
        height: 100%;
        position: absolute;
        left: 0;
        top: 0;
        z-index: 998;
        background-color: gainsboro;
        opacity: 0.6;
        display: none;
    }

    #addColor {
        position: fixed;
        z-index: 999;
        display: none;
        top: 30%;
        left: 40%;

    }

    #editColor {
        position: fixed;
        z-index: 999;
        display: none;
        top: 30%;
        left: 40%;

    }

    #editGroup {
        position: fixed;
        z-index: 999;
        display: none;
        top: 30%;
        left: 40%;

    }

    #roelName {
        float: right;
        margin: 15px;
    }
</style>
<body class="hold-transition skin-blue sidebar-mini">
<div th:replace="common/LeftCommon::common_top_left"></div>

<div class="content-wrapper" style="min-height: 901px;">
    <div class="single-pannel">
        <form class="form-horizontal ng-valid ng-dirty" name="editForm" novalidate="novalidate">
            <section class="content-header">
                <h1>
                    Data Tables
                    <small>advanced tables</small>
                </h1>
                <ol class="breadcrumb">
                    <li><a href="/index"><i class="fa fa-dashboard"></i> 首页</a></li>
                    <li><a href="#"></a>系统设置</li>
                    <li class="active">门店与员工</li>
                </ol>
            </section>
            <section class="content">
                <div class="row">
                    <div class="col-md-4" style="overflow:auto; padding: 10px; position: static">
                        <div class="box">
                            <div class="box-header">
                                <h3 class="box-title">角色信息</h3>

                                <div class="box-tools">
                                    <div class="input-group input-group-sm " style="width: 150px;">
                                        <input type="text" name="table_search" id="myInput_1" onkeyup="myFunction()"
                                               class="form-control pull-right" placeholder="名称">

                                        <div class="input-group-btn">
                                            <button type="submit" class="btn btn-default"><i class="fa fa-search"></i>
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!-- /.box-header -->
                            <div class="box-body table-responsive no-padding ">
                                <table class="table table-hover" id="myTable_1">
                                    <tr>
                                        <th>操作</th>
                                        <th>名称</th>
                                        <th>备注</th>
                                    </tr>
                                    <tr th:each="role: ${role}">
                                        <td><span class="badge bg-green"
                                                  th:onclick="javascript:copyasNew([[${role.name} ]]);">复制为新增</span>
                                            <span class="badge bg-red" id="none_display"
                                                  th:onclick="'javascript:deleteRole(\''+ ${role.id} + '\')'">删除</span>
                                        </td>
                                        <td th:text="${role.name}"
                                            th:onclick="javascript:Synchronize([[${role.id}]],[[${role.name}]]);"></td>
                                        <td th:text="${role.id}"></td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>

                    <div class="col-md-8" style="overflow:auto; padding: 10px; position: static">
                        <!-- 左则面板 -->
                        <div class="box">
                            <div class="panel-heading " style="padding-bottom: 10px; ">
                                <div class="btn-pull-right">
                                    <button class="btn-normal btn-success btn-add" onclick="newRole()"
                                            style="float:right">
                                        新增角色
                                    </button>
                                </div>
                                <span class="tips-text" style="float:left">&nbsp;&nbsp;提示：员工的角色权限修改后需要退出重新登录才会生效。</span>
                            </div>
                            <hr style=" height:2px;border:none;border-top:2px dotted #575757;">
                            <div class="panel-body">
                                <div ng-show="!loadingOrder" class=""><!-- 加载完成部分 -->
                                    <!-- 新增或编辑员工表单对话框 -->
                                    <form class="form-horizontal editor-dialog " id="addForm" name="addForm"
                                          novalidate="" method="post">
                                        <div class="form-group ">
                                            <label class="control-label col-sm-2"><span class="text-danger">* </span>名称</label>
                                            <div class="col-sm-3 validate_input">
                                                <input type="text" class="form-control" id="role_Name" placeholder="名称">

                                            </div>
                                            <label class="control-label col-sm-2" for="remark">备注</label>
                                            <div class="col-sm-4">
                                                <input type="text" name="remark" class="form-control" id="remark">
                                            </div>
                                        </div>


                                        <div class="form-group">
                                            <label class="control-label col-sm-1">权限</label>
                                            <div class="col-sm-11">
                                                <table class="table table-condensed">
                                                    <tbody>
                                                    <tr>
                                                        <th>一级</th>
                                                        <th>二级</th>
                                                        <th>权限配置细则</th>
                                                    </tr>
                                                    </tbody><!-- ngRepeat: (ind,resource) in resources -->
                                                    <tbody>

                                                    <tr>
                                                        <td rowspan="4" nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer1_1"
                                                                       onclick="allSelect('layer1_1', 'layer2_1', 'layer3_1','layer4_1',4)">
                                                                <span>采购</span>
                                                            </label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_1"
                                                                       onclick="singleSelect2parent('layer1_1', 'layer2_1', 'layer3_1_1','layer4_1_1',0)">
                                                                <span>采购单</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" class="ng-scope ng-valid ng-dirty"
                                                       name="layer3_1_1"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_1',0),single3('layer3_1_1','layer4_1_1')">
												<span>查看</span>
											</label>
															<span
                                                                    class="children-resource ng-scope">
												<span>[</span>
                                                                <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_1_1"
                                                               onclick="singleSelect4parent('layer1_1', 'layer2_1', 'layer3_1_1','layer4_1_1',0)">
														<span>采购价</span>
													</label>
												</span>
                                                                <span>]</span><br>
											</span>
										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_1"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_1',0)">
												<span>草稿</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_1"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_1',0)">
												<span>采购</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_1"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_1',0)">
												<span>删除</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_1"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_1',0)">
												<span>撤销</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_1"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_1',0)">
												<span>打印</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_1"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_1',0)">
												<span>对比原订单</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_1"
                                                                       onclick="singleSelect2parent('layer1_1', 'layer2_1', 'layer3_1_2','layer4_1',1)"
                                                                >
                                                                <span>采购退货单</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_2"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_2',1)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_2"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_2',1)">
												<span>草稿</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_2"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_2',1)">
												<span>退货</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_2"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_2',1)">
												<span>删除</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_2"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_2',1)">
												<span>撤销</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_2"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_2',1)">
												<span>打印</span>
											</label>
										</span>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_1"
                                                                       onclick="singleSelect2parent('layer1_1', 'layer2_1', 'layer3_1_3','layer4_1',2)"
                                                                >
                                                                <span>供应商管理</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_3"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_3',2)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_3"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_3',2)">
												<span>新增</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_3"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_3',2)">
												<span>新增</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_3"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_3',2)">
												<span>编辑</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_3"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_3',2)">
												<span>删除</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_3"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_3',2)">
												<span>删除</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_3"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_3',2)">
												<span>导入</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_1_3"
                                                       onclick="singleSelect3parent('layer1_1', 'layer2_1', 'layer3_1_3',2)">
												<span>导出</span>
											</label>

										</span></td>
                                                    </tbody>
                                                    <tbody>
                                                    <tr>
                                                        <td rowspan="10" nowrap="nowrap"
                                                        >
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer1_2"
                                                                       onclick="allSelect('layer1_2', 'layer2_2', 'layer3_2','layer4_2',10)"
                                                                >
                                                                <span>销售</span>
                                                            </label>
                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_2"
                                                                       onclick="singleSelect2parent('layer1_2', 'layer2_2', 'layer3_2_1','layer4_2_2',0)"
                                                                >
                                                                <span>销售单</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_1"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_1',0),single3('layer3_2_1','layer4_2_2')">
												<span>查看</span>
											</label>
                                                            <span class="children-resource ng-scope">
												<span>[</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_2_2"
                                                               onclick="singleSelect4parent('layer1_2', 'layer2_2', 'layer3_2_1','layer4_2_2',0)">
														<span>批发价</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_2_2"
                                                               onclick="singleSelect4parent('layer1_2', 'layer2_2', 'layer3_2_1','layer4_2_2',0)"
                                                        >
														<span>零售价</span>
													</label>
												</span>
                                                            <span>]</span><br>
											</span>
										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_1"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_1',0)">
												<span>草稿</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_1"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_1',0)">
												<span>出售</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_1"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_1',0)">
												<span>删除</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_1"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_1',0)">
												<span>撤销</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_1"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_1',0)">
												<span>复制为销售退货单</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_1"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_1',0)">
												<span>打印</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_1"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_1',0)">
												<span>邮件</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_1"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_1',0)">
												<span>支付宝条码支付</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_1"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_1',0)">
												<span>修改销售员</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_1"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_1',0)">
												<span>对比原订单</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_1"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_1',0)">
												<span>修改价格</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_1"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_1',0)">
												<span>抹零</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_1"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_1',0)">
												<span>退款</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_1"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_1',0)">
												<span>移除图片</span>
											</label>
										</span></td>
                                                    </tr>
                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_2"
                                                                       onclick="singleSelect2parent('layer1_2', 'layer2_2', 'layer3_2_3','layer4_2',1)">
                                                                <span>销售退货单</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_3"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_3',1)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_3"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_3',1)">
												<span>草稿</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_3"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_3',1)">
												<span>退货</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_3"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_3',1)">
												<span>删除</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_3"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_3',1)">
												<span>撤销</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_3"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_3',1)">
												<span>打印</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_3"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_3',1)">
												<span>修改价格</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_3"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_3',1)">
												<span>抹零</span>
											</label>
										</span>
                                                        </td>
                                                    </tr>
                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_2"
                                                                       onclick="singleSelect2parent('layer1_2', 'layer2_2', 'layer3_2_6','layer4_2',2)">
                                                                <span>客户管理</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_6"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_6',2)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_6"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_6',2)">
												<span>新增</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_6"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_6',2)">
												<span>新增</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_6"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_6',2)">
												<span>编辑</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_6"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_6',2)">
												<span>删除</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_6"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_6',2)">
												<span>删除</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_6"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_6',2)">
												<span>导入</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_6"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_6',2)">
												<span>导出</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_6"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_6',2)">
												<span>客户积分</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_2"
                                                                       onclick="singleSelect2parent('layer1_2', 'layer2_2', 'layer3_2_7','layer4_2',3)">
                                                                <span>客户分类</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_7"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_7',3)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_7"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_7',3)">
												<span>编辑</span>
											</label>
										</span>
                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_2"
                                                                       onclick="singleSelect2parent('layer1_2', 'layer2_2', 'layer3_2_8','layer4_2',4)">
                                                                <span>快速收款</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_8"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_8',4)">
												<span>收款</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_2"
                                                                       onclick="singleSelect2parent('layer1_2', 'layer2_2', 'layer3_2_9','layer4_2',5)">
                                                                <span>营销管理</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_9"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_9',5)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_2_9"
                                                       onclick="singleSelect3parent('layer1_2', 'layer2_2', 'layer3_2_9',5)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    </tbody>
                                                    <tbody>

                                                    <tr>

                                                        <td rowspan="7" nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer1_3"
                                                                       onclick="allSelect('layer1_3', 'layer2_3', 'layer3_3','layer4_3',7)">
                                                                <span>仓库</span>
                                                            </label>
                                                        </td>
                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_3"
                                                                       onclick="singleSelect2parent('layer1_3', 'layer2_3', 'layer3_3_0','layer4_3_1',0)">
                                                                <span>仓库查询</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_0"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_0',0),single3('layer3_3_0','layer4_3_1')">
												<span>查看</span>
											</label>
                                                            <span class="children-resource ng-scope">
												<span>[</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_3_1"
                                                               onclick="singleSelect4parent('layer1_3', 'layer2_3', 'layer3_3_0','layer4_3_1',0)">
														<span>进货价</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_3_1"
                                                               onclick="singleSelect4parent('layer1_3', 'layer2_3', 'layer3_3_0','layer4_3_1',0)">
														<span>批发价</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_3_1"
                                                               onclick="singleSelect4parent('layer1_3', 'layer2_3', 'layer3_3_0','layer4_3_1',0)">
														<span>零售价</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_3_1"
                                                               onclick="singleSelect4parent('layer1_3', 'layer2_3', 'layer3_3_0','layer4_3_1',0)">
														<span>厂家建议零售价</span>
													</label>
												</span>
                                                            <span>]</span><br>
											</span>
										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_0"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_0',0)">
												<span>打印</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_0"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_0',0)">
												<span>导出</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_0"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_0',0)">
												<span>盘点</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_0"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_0',0)">
												<span>库存成本汇总</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_3"
                                                                       onclick="singleSelect2parent('layer1_3', 'layer2_3', 'layer3_3_1','layer4_3',1)">
                                                                <span>仓库盘点单</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_1"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_1',1)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_1"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_1',1)">
												<span>草稿</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_1"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_1',1)">
												<span>盘点</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_1"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_1',1)">
												<span>删除</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_1"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_1',1)">
												<span>撤销</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_3"
                                                                       onclick="singleSelect2parent('layer1_3', 'layer2_3', 'layer3_3_2','layer4_3_3',2)">
                                                                <span
                                                                >库存调拨单</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_2"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_2',2),single3('layer3_3_2','layer4_3_3')">
												<span>查看</span>
											</label>
                                                            <span class="children-resource ng-scope">
												<span>[</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_3_3"
                                                               onclick="singleSelect4parent('layer1_3', 'layer2_3', 'layer3_3_2','layer4_3_3',2)">
														<span>采购价</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_3_3"
                                                               onclick="singleSelect4parent('layer1_3', 'layer2_3', 'layer3_3_2','layer4_3_3',2)">
														<span>批发价</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_3_3"
                                                               onclick="singleSelect4parent('layer1_3', 'layer2_3', 'layer3_3_2','layer4_3_3',2)">
														<span>零售价</span>
													</label>
												</span>
                                                            <span>]</span><br>
											</span>
										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_2"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_2',2)">
												<span>打印</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_2"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_2',2)">
												<span>草稿</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_2"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_2',2)">
												<span>调拨</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_2"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_2',2)">
												<span>删除</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_2"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_2',2)">
												<span>撤销</span>
											</label>
										</span>
                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_3"
                                                                       onclick="singleSelect2parent('layer1_3', 'layer2_3', 'layer3_3_3','layer4_3',3)">
                                                                <span>库存流水</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_3"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_3',3)">
												<span>查看</span>
											</label>
										</span>
                                                        </td>
                                                    </tr>
                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_3"
                                                                       onclick="singleSelect2parent('layer1_3', 'layer2_3', 'layer3_3_4','layer4_3',4)">
                                                                <span>仓库管理</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_4"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_4',4)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_4"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_4',4)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_3"
                                                                       onclick="singleSelect2parent('layer1_3', 'layer2_3', 'layer3_3_5','layer4_3',5)">
                                                                <span>出库单</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_5"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_5',5)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_5"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_5',5)">
												<span>出库</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_5"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_5',5)">
												<span>撤销</span>
											</label>
										</span>
                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_3"
                                                                       onclick="singleSelect2parent('layer1_3', 'layer2_3', 'layer3_3_6','layer4_3',6)">
                                                                <span>入库单</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_6"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_6',6)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_6"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_6',6)">
												<span>入库</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_3_6"
                                                       onclick="singleSelect3parent('layer1_3', 'layer2_3', 'layer3_3_6',6)">
												<span>撤销</span>
											</label>
										</span>
                                                        </td>
                                                    </tr>

                                                    </tbody>
                                                    <tbody>

                                                    <tr>

                                                        <td rowspan="14" nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer1_4"
                                                                       onclick="allSelect('layer1_4', 'layer2_4', 'layer3_4','layer4_4',14)">
                                                                <span>报表</span>
                                                            </label>
                                                        </td>
                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_4"
                                                                       onclick="singleSelect2parent('layer1_4', 'layer2_4', 'layer3_4_0','layer4_4',0)">
                                                                <span>采购报表</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_0"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_0',0)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_0"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_0',0)">
												<span>导出</span>
											</label>

										</span>
                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_4"
                                                                       onclick="singleSelect2parent('layer1_4', 'layer2_4', 'layer3_4_1','layer4_4_2',1)">
                                                                <span>销售报表</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_1"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_1',1),single3('layer3_4_1','layer4_4_2')">
												<span>查看</span>
											</label>
                                                            <span class="children-resource ng-scope">
												<span>[</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_4_2"
                                                               onclick="singleSelect4parent('layer1_4', 'layer2_4', 'layer3_4_1','layer4_4_2',1)">
														<span>采购均价</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_4_2"
                                                               onclick="singleSelect4parent('layer1_4', 'layer2_4', 'layer3_4_1','layer4_4_2',1)">
														<span>采购成本</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_4_2"
                                                               onclick="singleSelect4parent('layer1_4', 'layer2_4', 'layer3_4_1','layer4_4_2',1)">
														<span>毛利润</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_4_2"
                                                               onclick="singleSelect4parent('layer1_4', 'layer2_4', 'layer3_4_1','layer4_4_2',1)">
														<span>毛利率</span>
													</label>
												</span>
                                                            <span>]</span><br>
											</span>
										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_1"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_1',1)">
												<span>导出</span>
											</label>

										</span>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_4"
                                                                       onclick="singleSelect2parent('layer1_4', 'layer2_4', 'layer3_4_2','layer4_4',2)">
                                                                <span>客户销量</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_2"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_2',2)">
												<span>查看</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_4"
                                                                       onclick="singleSelect2parent('layer1_4', 'layer2_4', 'layer3_4_3','layer4_4',3)">
                                                                <span>商品销量</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_3"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_3',3)">
												<span>查看</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_4"
                                                                       onclick="singleSelect2parent('layer1_4', 'layer2_4', 'layer3_4_4','layer4_4',4)">
                                                                <span>滞/热销商品</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_4"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_4',4)">
												<span>查看</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>
                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_4"
                                                                       onclick="singleSelect2parent('layer1_4', 'layer2_4', 'layer3_4_5','layer4_4_6',5)">
                                                                <span>进销对比</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_5"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_5',5),single3('layer3_4_5','layer4_4_6')">
												<span>查看</span>
											</label>
                                                            <span class="children-resource ng-scope">
												<span>[</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_4_6"
                                                               onclick="singleSelect4parent('layer1_4', 'layer2_4', 'layer3_4_1','layer4_4_6',5)">
														<span>进货金额</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_4_6"
                                                               onclick="singleSelect4parent('layer1_4', 'layer2_4', 'layer3_4_1','layer4_4_6',5)">
														<span>销售金额</span>
													</label>
												</span>
                                                            <span>]</span><br>
											</span>
										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_4"
                                                                       onclick="singleSelect2parent('layer1_4', 'layer2_4', 'layer3_4_6','layer4_4_7',6)">
                                                                <span>盘点报表</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_6"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_6',6),single3('layer3_4_6','layer4_4_7')">
												<span>查看</span>
											</label>
                                                            <span class="children-resource ng-scope">
												<span>[</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_4_7"
                                                               onclick="singleSelect4parent('layer1_4', 'layer2_4', 'layer3_4_6','layer4_4_7',6)">
														<span>盈亏金额</span>
													</label>
												</span>
                                                            <span>]</span><br>
											</span>
										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_6"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_6',6)">
												<span>导出</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>
                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_4"
                                                                       onclick="singleSelect2parent('layer1_4', 'layer2_4', 'layer3_4_7','layer4_4',7)">
                                                                <span>调拨报表</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_7"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_7',7)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_7"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_7',7)">
												<span>导出</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_4"
                                                                       onclick="singleSelect2parent('layer1_4', 'layer2_4', 'layer3_4_8','layer4_4',8)">
                                                                <span>入库报表</span>
                                                            </label>
                                                        </td>
                                                        <td>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_4"
                                                                       onclick="singleSelect2parent('layer1_4', 'layer2_4', 'layer3_4_9','layer4_4',9)">
                                                                <span>出库报表</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_9"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_9',9)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_9"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_9',9)">
												<span>导出</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_4"
                                                                       onclick="singleSelect2parent('layer1_4', 'layer2_4', 'layer3_4_10','layer4_4',10)">
                                                                <span>经营汇总</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_10"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_10',10)">
												<span>查看</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_4"
                                                                       onclick="singleSelect2parent('layer1_4', 'layer2_4', 'layer3_4_11','layer4_4',11)">
                                                                <span>经营概况</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_11"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_11',11)">
												<span>查看</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_4"
                                                                       onclick="singleSelect2parent('layer1_4', 'layer2_4', 'layer3_4_12','layer4_4',12)">
                                                                <span>员工业绩报表</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_12"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_12',12)">
												<span>查看业绩</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_12"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_12',12)">
												<span>查看所有员工业绩</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>
                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_4"
                                                                       onclick="singleSelect2parent('layer1_4', 'layer2_4', 'layer3_4_13','layer4_4_14',13)">
                                                                <span>商品汇总</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_13"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_13',13),single3('layer3_4_13','layer4_4_14')">
												<span>查看</span>
											</label>
                                                            <span class="children-resource ng-scope">
												<span>[</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_4_14"
                                                               onclick="singleSelect4parent('layer1_4', 'layer2_4', 'layer3_4_13','layer4_4_14',13)">
														<span>采购额</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_4_14"
                                                               onclick="singleSelect4parent('layer1_4', 'layer2_4', 'layer3_4_13','layer4_4_14',13)">
														<span>销售额</span>
													</label>
												</span>
                                                            <span>]</span><br>
											</span>
										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_4_13"
                                                       onclick="singleSelect3parent('layer1_4', 'layer2_4', 'layer3_4_13',13)">
												<span>导出</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    </tbody>
                                                    <tbody>

                                                    <tr>

                                                        <td rowspan="7" nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer1_5"
                                                                       onclick="allSelect('layer1_5', 'layer2_5', 'layer3_5','layer4_5',7)">
                                                                <span>财务</span>
                                                            </label>
                                                        </td>
                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_5"
                                                                       onclick="singleSelect2parent('layer1_5', 'layer2_5', 'layer3_5_0','layer4_5',0)">
                                                                <span>财务流水及记账</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_0"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_0',0)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_0"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_0',0)">
												<span>新增收支</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_0"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_0',0)">
												<span>编辑收支</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_0"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_0',0)">
												<span>删除收支</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_0"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_0',0)">
												<span>期初调整</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_0"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_0',0)">
												<span>打印</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_0"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_0',0)">
												<span>导出</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_5"
                                                                       onclick="singleSelect2parent('layer1_5', 'layer2_5', 'layer3_5_1','layer4_5',1)">
                                                                <span>客户对账及收款</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_1"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_1',1)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_1"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_1',1)">
												<span>收款</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_1"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_1',1)">
												<span>期初调整</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_1"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_1',1)">
												<span>编辑收款单</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_1"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_1',1)">
												<span>邮件</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_1"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_1',1)">
												<span>打印</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_1"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_1',1)">
												<span>导出</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_5"
                                                                       onclick="singleSelect2parent('layer1_5', 'layer2_5', 'layer3_5_2','layer4_5',2)">
                                                                <span>供应商对账及付款</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_2"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_2',2)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_2"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_2',2)">
												<span>付款</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_2"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_2',2)">
												<span>期初调整</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_2"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_2',2)">
												<span>编辑付款单</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_2"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_2',2)">
												<span>打印</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_2"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_2',2)">
												<span>导出</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_5"
                                                                       onclick="singleSelect2parent('layer1_5', 'layer2_5', 'layer3_5_3','layer4_5',3)">
                                                                <span>结算账户</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_3"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_3',3)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_3"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_3',3)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_5"
                                                                       onclick="singleSelect2parent('layer1_5', 'layer2_5', 'layer3_5_4','layer4_5',4)">
                                                                <span>账目类型</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_4"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_4',4)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_4"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_4',4)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_5"
                                                                       onclick="singleSelect2parent('layer1_5', 'layer2_5', 'layer3_5_5','layer4_5',5)">
                                                                <span>资金提现</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_5"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_5',5)">
												<span>查看提现</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_5"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_5',5)">
												<span>提现</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_5"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_5',5)">
												<span>查看代收流水</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_5"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_5',5)">
												<span>查看代收单据</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_5"
                                                                       onclick="singleSelect2parent('layer1_5', 'layer2_5', 'layer3_5_6','layer4_5',6)">
                                                                <span>(微信/支付宝)收款流水</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_6"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_6',6)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_5_6"
                                                       onclick="singleSelect3parent('layer1_5', 'layer2_5', 'layer3_5_6',6)">
												<span>退款</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    </tbody>
                                                    <tbody>

                                                    <tr>

                                                        <td rowspan="10" nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer1_6"
                                                                       onclick="allSelect('layer1_6', 'layer2_6', 'layer3_6','layer4_6',10)">
                                                                <span>商品</span>
                                                            </label>
                                                        </td>
                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_6"
                                                                       onclick="singleSelect2parent('layer1_6', 'layer2_6', 'layer3_6_0','layer4_6_1',0)">
                                                                <span>商品管理</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_0"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_0',0),single3('layer3_6_0','layer4_6_1')">
												<span>查看</span>
											</label>
                                                            <span class="children-resource ng-scope">
												<span>[</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_6_1"
                                                               onclick="singleSelect4parent('layer1_6', 'layer2_6', 'layer3_6_0','layer4_6_1',0)">
														<span>采购价</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_6_1"
                                                               onclick="singleSelect4parent('layer1_6', 'layer2_6', 'layer3_6_0','layer4_6_1',0)">
														<span>批发价</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_6_1"
                                                               onclick="singleSelect4parent('layer1_6', 'layer2_6', 'layer3_6_0','layer4_6_1',0)">
														<span>零售价</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_6_1"
                                                               onclick="singleSelect4parent('layer1_6', 'layer2_6', 'layer3_6_0','layer4_6_1',0)">
														<span>厂家建议零售价</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_6_1"
                                                               onclick="singleSelect4parent('layer1_6', 'layer2_6', 'layer3_6_0','layer4_6_1',0)">
														<span>商品统计</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_6_1"
                                                               onclick="singleSelect4parent('layer1_6', 'layer2_6', 'layer3_6_0','layer4_6_1',0)">
														<span>客户统计</span>
													</label>
												</span>
                                                            <span>]</span><br>
											</span>
										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_0"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_0',0)">
												<span>编辑</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_0"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_0',0)">
												<span>打印</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_0"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_0',0)">
												<span>导入</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_0"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_0',0)">
												<span>导出</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_6"
                                                                       onclick="singleSelect2parent('layer1_6', 'layer2_6', 'layer3_6_1','layer4_6',1)">
                                                                <span>商品分类</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_1"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_1',1)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_1"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_1',1)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_6"
                                                                       onclick="singleSelect2parent('layer1_6', 'layer2_6', 'layer3_6_2','layer4_6',2)">
                                                                <span>颜色管理</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_2"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_2',2)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_2"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_2',2)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_6"
                                                                       onclick="singleSelect2parent('layer1_6', 'layer2_6', 'layer3_6_3','layer4_6',3)">
                                                                <span>尺码管理</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_3"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_3',3)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_3"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_3',3)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_6"
                                                                       onclick="singleSelect2parent('layer1_6', 'layer2_6', 'layer3_6_4','layer4_6',4)">
                                                                <span>品牌管理</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_4"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_4',4)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_4"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_4',4)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_6"
                                                                       onclick="singleSelect2parent('layer1_6', 'layer2_6', 'layer3_6_5','layer4_6',5)">
                                                                <span>材质管理</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_5"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_5',5)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_5"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_5',5)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_6"
                                                                       onclick="singleSelect2parent('layer1_6', 'layer2_6', 'layer3_6_6','layer4_6',6)">
                                                                <span>款式管理</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_6"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_6',6)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_6"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_6',6)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_6"
                                                                       onclick="singleSelect2parent('layer1_6', 'layer2_6', 'layer3_6_7','layer4_6',7)">
                                                                <span>季节管理</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_7"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_7',7)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_7"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_7',7)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_6"
                                                                       onclick="singleSelect2parent('layer1_6', 'layer2_6', 'layer3_6_8','layer4_6',8)">
                                                                <span>单位管理</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_8"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_8',8)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_8"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_8',8)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_6"
                                                                       onclick="singleSelect2parent('layer1_6', 'layer2_6', 'layer3_6_9','layer4_6',9)">
                                                                <span>条码管理</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_6_9"
                                                       onclick="singleSelect3parent('layer1_6', 'layer2_6', 'layer3_6_9',9)">
												<span>查看</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    </tbody>
                                                    <tbody>

                                                    <tr>

                                                        <td rowspan="12" nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer1_7"
                                                                       onclick="allSelect('layer1_7', 'layer2_7', 'layer3_7','layer4_7',12)">
                                                                <span>系统</span>
                                                            </label>
                                                        </td>
                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_7"
                                                                       onclick="singleSelect2parent('layer1_7', 'layer2_7', 'layer3_7_0','layer4_7',0)">
                                                                <span>个人信息</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_7_0"
                                                       onclick="singleSelect3parent('layer1_7', 'layer2_7', 'layer3_7_0',0)">
												<span>查看</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_7"
                                                                       onclick="singleSelect2parent('layer1_7', 'layer2_7', 'layer3_7_1','layer4_7',1)">
                                                                <span>门店与员工</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_7_1"
                                                       onclick="singleSelect3parent('layer1_7', 'layer2_7', 'layer3_7_1',1)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_7_1"
                                                       onclick="singleSelect3parent('layer1_7', 'layer2_7', 'layer3_7_1',1)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_7"
                                                                       onclick="singleSelect2parent('layer1_7', 'layer2_7', 'layer3_7_2','layer4_7',2)">
                                                                <span>角色管理</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_7_2"
                                                       onclick="singleSelect3parent('layer1_7', 'layer2_7', 'layer3_7_2',2)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_7_2"
                                                       onclick="singleSelect3parent('layer1_7', 'layer2_7', 'layer3_7_2',2)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_7"
                                                                       onclick="singleSelect2parent('layer1_7', 'layer2_7', 'layer3_7_3','layer4_7',3)">
                                                                <span>公司公告</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_7_3"
                                                       onclick="singleSelect3parent('layer1_7', 'layer2_7', 'layer3_7_3',3)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_7_3"
                                                       onclick="singleSelect3parent('layer1_7', 'layer2_7', 'layer3_7_3',3)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_7"
                                                                       onclick="singleSelect2parent('layer1_7', 'layer2_7', 'layer3_7_4','layer4_7',4)">
                                                                <span>打印模板</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_7_4"
                                                       onclick="singleSelect3parent('layer1_7', 'layer2_7', 'layer3_7_4',4)">
												<span>查看及编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_7"
                                                                       onclick="singleSelect2parent('layer1_7', 'layer2_7', 'layer3_7_5','layer4_7',5)">
                                                                <span>短信配置</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_7_5"
                                                       onclick="singleSelect3parent('layer1_7', 'layer2_7', 'layer3_7_5',5)">
												<span>查看及编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_7"
                                                                       onclick="singleSelect2parent('layer1_7', 'layer2_7', 'layer3_7_7','layer4_7',6)">
                                                                <span>系统参数</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_7_7"
                                                       onclick="singleSelect3parent('layer1_7', 'layer2_7', 'layer3_7_7',6)">
												<span>编辑</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_7_7"
                                                       onclick="singleSelect3parent('layer1_7', 'layer2_7', 'layer3_7_7',6)">
												<span>查看</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_7"
                                                                       onclick="singleSelect2parent('layer1_7', 'layer2_7', 'layer3_7_8','layer4_7',7)">
                                                                <span>系统日志</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_7_8"
                                                       onclick="singleSelect3parent('layer1_7', 'layer2_7', 'layer3_7_8',7)">
												<span>查看</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_7"
                                                                       onclick="singleSelect2parent('layer1_7', 'layer2_7', 'layer3_7_9','layer4_7',8)">
                                                                <span>新手导航</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_7_9"
                                                       onclick="singleSelect3parent('layer1_7', 'layer2_7', 'layer3_7_9',8)">
												<span>查看</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_7"
                                                                       onclick="singleSelect2parent('layer1_7', 'layer2_7', 'layer3_7_10','layer4_7',9)">
                                                                <span>系统重置</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_7_10"
                                                       onclick="singleSelect3parent('layer1_7', 'layer2_7', 'layer3_7_10',9)">
												<span>查看及编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_7"
                                                                       onclick="singleSelect2parent('layer1_7', 'layer2_7', 'layer3_7_11','layer4_7',10)">
                                                                <span>其他</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_7_11"
                                                       onclick="singleSelect3parent('layer1_7', 'layer2_7', 'layer3_7_11',10)">
												<span>数据补录权限（没有此权限时，将不能提交或撤销业务日期为今日之前的单据或财务，包括采购单、销售单、调拨单、客户收款、财务记账等）</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    </tbody>
                                                    <tbody>

                                                    <tr>

                                                        <td rowspan="6" nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer1_8"
                                                                       onclick="allSelect('layer1_8', 'layer2_8', 'layer3_8','layer4_8',6)">
                                                                <span>店铺</span>
                                                            </label>
                                                        </td>
                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_8"
                                                                       onclick="singleSelect2parent('layer1_8', 'layer2_8', 'layer3_8_0','layer4_8',0)">
                                                                <span>店铺概况</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_8_0"
                                                       onclick="singleSelect3parent('layer1_8', 'layer2_8', 'layer3_8_0',0)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_8_0"
                                                       onclick="singleSelect3parent('layer1_8', 'layer2_8', 'layer3_8_0',0)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_8"
                                                                       onclick="singleSelect2parent('layer1_8', 'layer2_8', 'layer3_8_1','layer4_8_2',1)">
                                                                <span>上架商品</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_8_1"
                                                       onclick="singleSelect3parent('layer1_8', 'layer2_8', 'layer3_8_1',1),single3('layer3_8_1','layer4_8_2')">
												<span>查看</span>
											</label>
                                                            <span class="children-resource ng-scope">
												<span>[</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_8_2"
                                                               onclick="singleSelect4parent('layer1_8', 'layer2_8', 'layer3_8_1','layer4_8_2',1)">
														<span>采购价</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_8_2"
                                                               onclick="singleSelect4parent('layer1_8', 'layer2_8', 'layer3_8_1','layer4_8_2',1)">
														<span>批发价</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_8_2"
                                                               onclick="singleSelect4parent('layer1_8', 'layer2_8', 'layer3_8_1','layer4_8_2',1)">
														<span>零售价</span>
													</label>
												</span>
                                                            <span>
													<label class="sel-a">
														<input type="checkbox" name="layer4_8_2"
                                                               onclick="singleSelect4parent('layer1_8', 'layer2_8', 'layer3_8_1','layer4_8_2',1)">
														<span>厂家建议零售价</span>
													</label>
												</span>
                                                            <span>]</span><br>
											</span>
										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_8_1"
                                                       onclick="singleSelect3parent('layer1_8', 'layer2_8', 'layer3_8_1',1)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_8"
                                                                       onclick="singleSelect2parent('layer1_8', 'layer2_8', 'layer3_8_2','layer4_8',2)">
                                                                <span>订单处理</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_8_2"
                                                       onclick="singleSelect3parent('layer1_8', 'layer2_8', 'layer3_8_2',2)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_8_2"
                                                       onclick="singleSelect3parent('layer1_8', 'layer2_8', 'layer3_8_2',2)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_8"
                                                                       onclick="singleSelect2parent('layer1_8', 'layer2_8', 'layer3_8_3','layer4_8',3)">
                                                                <span>会员管理</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_8_3"
                                                       onclick="singleSelect3parent('layer1_8', 'layer2_8', 'layer3_8_3',3)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_8_3"
                                                       onclick="singleSelect3parent('layer1_8', 'layer2_8', 'layer3_8_3',3)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_8"
                                                                       onclick="singleSelect2parent('layer1_8', 'layer2_8', 'layer3_8_4','layer4_8',4)">
                                                                <span>店铺设置</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_8_4"
                                                       onclick="singleSelect3parent('layer1_8', 'layer2_8', 'layer3_8_4',4)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_8_4"
                                                       onclick="singleSelect3parent('layer1_8', 'layer2_8', 'layer3_8_4',4)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_8"
                                                                       onclick="singleSelect2parent('layer1_8', 'layer2_8', 'layer3_8_5','layer4_8',5)">
                                                                <span>消息</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_8_5"
                                                       onclick="singleSelect3parent('layer1_8', 'layer2_8', 'layer3_8_5',5)">
												<span>查看与回复</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    </tbody>
                                                    <tbody>

                                                    <tr>

                                                        <td rowspan="2" nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer1_9"
                                                                       onclick="allSelect('layer1_9', 'layer2_9', 'layer3_9','layer4_9',2)">
                                                                <span>分销</span>
                                                            </label>
                                                        </td>
                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_9"
                                                                       onclick="singleSelect2parent('layer1_9', 'layer2_9', 'layer3_9_0','layer4_9',0)">
                                                                <span>分销规则</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_9_0"
                                                       onclick="singleSelect3parent('layer1_9', 'layer2_9', 'layer3_9_0',0)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_9_0"
                                                       onclick="singleSelect3parent('layer1_9', 'layer2_9', 'layer3_9_0',0)">
												<span>编辑</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_9"
                                                                       onclick="singleSelect2parent('layer1_9', 'layer2_9', 'layer3_9_1','layer4_9',1)">
                                                                <span>分销列表</span>
                                                            </label>
                                                        </td>
                                                        <td>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_9_1"
                                                       onclick="singleSelect3parent('layer1_9', 'layer2_9', 'layer3_9_1',1)">
												<span>查看</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_9_1"
                                                       onclick="singleSelect3parent('layer1_9', 'layer2_9', 'layer3_9_1',1)">
												<span>编辑</span>
											</label>

										</span>
                                                            <span>
											<label class="sel-a">
												<input type="checkbox" name="layer3_9_1"
                                                       onclick="singleSelect3parent('layer1_9', 'layer2_9', 'layer3_9_1',1)">
												<span>导出</span>
											</label>

										</span>

                                                        </td>
                                                    </tr>

                                                    </tbody>
                                                    <tbody>

                                                    <tr>

                                                        <td rowspan="2" nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer1_10"
                                                                       onclick="allSelect('layer1_10', 'layer2_10', 'layer3_10','layer4_10',2)">
                                                                <span>营销管理</span>
                                                            </label>
                                                        </td>
                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_10"
                                                                       onclick="singleSelect2parent('layer1_10', 'layer2_10', 'layer3_10_0','layer4_10',0)">
                                                                <span>查看</span>
                                                            </label>
                                                        </td>
                                                        <td>

                                                        </td>
                                                    </tr>

                                                    <tr>

                                                        <td nowrap="nowrap">
                                                            <label class="sel-a">
                                                                <input type="checkbox"
                                                                       name="layer2_10"
                                                                       onclick="singleSelect2parent('layer1_10', 'layer2_10', 'layer3_10_1','layer4_10',1)">
                                                                <span>编辑</span>
                                                            </label>
                                                        </td>
                                                        <td>

                                                        </td>
                                                    </tr>

                                                    </tbody>
                                                    <tbody>

                                                    </tbody>
                                                    <tbody>

                                                    </tbody>
                                                </table>

                                            </div>
                                        </div>


                                        <div class="form-group">
                                            <div class="text-center">
                                                <button type="button" class="btn-normal btn-success"
                                                        th:onclick="saveRole()">保存
                                                </button>
                                            </div>
                                        </div>

                                        <input type="hidden" name="id" id="id">
                                        <input type="hidden" name="optimisticLockVersion" id="optimisticLockVersion">
                                        <input type="hidden" name="createTime" id="createTime">
                                    </form>
                                </div><!-- 加载完成部分end -->
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.row -->
            </section>

        </form>
    </div>
</div>

<!-- jQuery 3 -->
<script src="../../bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="../../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- DataTables -->
<script src="../../bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="../../bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<!-- SlimScroll -->
<script src="../../bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="../../bower_components/fastclick/lib/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="../../dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../../dist/js/demo.js"></script>
<!-- page script -->
<script>
    $(function () {
        $('#example1').DataTable()
        $('#example2').DataTable({
            'paging': true,
            'lengthChange': false,
            'searching': false,
            'ordering': true,
            'info': true,
            'autoWidth': false
        })
    })

    //层次关系，选中父节点，子节点全部选中
    function allSelect(check_v, checkname, checkname_1, checkname_2, num) {
        var v_item = document.getElementsByName(check_v);
        var items = document.getElementsByName(checkname);
        for (var i = 0; i < items.length; ++i) {
            if (v_item[0].checked) {
                items[i].checked = true;
            } else {
                items[i].checked = false;
            }
        }
        for (var j = 0; j < num; j++) {
            var name = checkname_1 + '_' + j;
            var items_1 = document.getElementsByName(name);
            var name1 = checkname_2 + '_' + j;
            var items_2 = document.getElementsByName(name1);
            for (var i = 0; i < items_1.length; ++i) {
                if (v_item[0].checked) {
                    items_1[i].checked = true;
                } else {
                    items_1[i].checked = false;
                }
            }
            for (var i = 0; i < items_2.length; ++i) {
                if (v_item[0].checked) {
                    items_2[i].checked = true;
                } else {
                    items_2[i].checked = false;
                }
            }
        }
    }

    // 中间部分对齐
    function singleSelect2parent(check_v, checkname, checkname_1, checkname_2, num) {
        var v_item = document.getElementsByName(check_v);
        var items = document.getElementsByName(checkname);
        var items_1 = document.getElementsByName(checkname_1);
        var childStatus = false;
        var items_2 = document.getElementsByName(checkname_2);
        for (var i = 0; i < items_1.length; ++i) {
            if (items[num].checked) {
                items_1[i].checked = true;
            } else {
                items_1[i].checked = false;
            }
        }
        for (var i = 0; i < items_2.length; ++i) {
            if (items[num].checked) {
                items_2[i].checked = true;
            } else {
                items_2[i].checked = false;
            }
        }
        for (var i = 0; i < items.length; ++i) {
            childStatus = (childStatus || items[i].checked);
        }
        if (childStatus) {
            v_item[0].checked = true;
        } else {
            v_item[0].checked = false;
        }
    }

    function singleSelect3parent(check_v, checkname, checkname_1, num) {
        var v_item = document.getElementsByName(check_v);
        var items = document.getElementsByName(checkname);
        var items_1 = document.getElementsByName(checkname_1);
        var childStatus = false;
        for (var i = 0; i < items_1.length; ++i) {
            childStatus = (childStatus || items_1[i].checked);
        }
        if (childStatus) {
            items[num].checked = true;
        } else {
            items[num].checked = false;
        }
        childStatus = false;
        for (var i = 0; i < items.length; ++i) {
            childStatus = (childStatus || items[i].checked);
        }
        if (childStatus) {
            v_item[0].checked = true;
        } else {
            v_item[0].checked = false;
        }
    }

    function single3(layer1, layer2) {
        var v_item = document.getElementsByName(layer1);
        var items = document.getElementsByName(layer2);
        for (var i = 0; i < items.length; ++i) {
            if (v_item[0].checked) {
                items[i].checked = true;
            } else {
                items[i].checked = false;
            }
        }
    }

    function singleSelect4parent(check_v, checkname, checkname_1, checkname_2, num) {
        var v_item = document.getElementsByName(check_v);
        var items = document.getElementsByName(checkname);
        var items_1 = document.getElementsByName(checkname_1);
        var items_2 = document.getElementsByName(checkname_2);
        var childStatus = false;
        for (var i = 0; i < items_2.length; ++i) {
            childStatus = (childStatus || items_2[i].checked);
        }
        if (childStatus) {
            items_1[0].checked = true;
            childStatus = false;
            for (var i = 0; i < items_1.length; ++i) {
                childStatus = (childStatus || items_1[i].checked);
            }
            if (childStatus) {
                items[num].checked = true;
            } else {
                items[num].checked = false;
            }
            childStatus = false;
            for (var i = 0; i < items.length; ++i) {
                childStatus = (childStatus || items[i].checked);
            }
            if (childStatus) {
                v_item[0].checked = true;
            } else {
                v_item[0].checked = false;
            }
        }
    }


    //搜索关键词
    function myFunction() {
        // 声明变量
        var input, filter, table, tr, td, i;
        input = document.getElementById("myInput_1");
        filter = input.value.toUpperCase();
        table = document.getElementById("myTable_1");
        tr = table.getElementsByTagName("tr");

        // 循环表格每一行，查找匹配项
        for (i = 0; i < tr.length; i++) {
            td = tr[i].getElementsByTagName("td")[1];
            if (td) {
                if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
                    tr[i].style.display = "";
                } else {
                    tr[i].style.display = "none";
                }
            }
        }
    }

    var oldname = "";

    // 名称备注同步
    function Synchronize(roleid, rolename) {
        oldname = rolename;
        $("#role_Name").val(rolename)
    }

    // HTML元素的显示与隐藏控制


    // 角色
    function newRole() {
        oldname = "";
    }

    // 添加颜色
    function saveRole() {
        $.ajax({
            url: "/role/saveRole",
            type: "POST",
            data: {
                name: $("#role_Name").val(),
                oldname: oldname
            },
            success: function (data) {
                if (data.code == 1) {
                    window.location.href = "/setting/role_management";
                    alert("保存成功");
                } else {
                    alert(data.msg);
                }
            }
        });
    }

    // 删除角色
    function deleteRole(roleID) {
        $.ajax({
            url: "/role/deleteRole",
            type: 'POST',
            data: {
                roleId: roleID
            },
            success: function (data) {
                if (data.code == 1) {
                    window.location.href = "/setting/role_management";
                    alert("删除成功");
                } else {
                    alert(data.msg);
                }
            }
        })
    }

    // 复制为新增
    function copyasNew(rolename) {
        $.ajax({
            url: "/role/copyasNew",
            type: 'POST',
            data: {
                rolename: rolename
            },
            success: function (data) {
                if (data.code == 1) {
                    window.location.href = "/setting/role_management";
                    alert("复制成功");
                } else {
                    alert(data.msg);
                }
            }
        })
    }


</script>
</body>
</html>